package com.ys.exception.base;

import com.ys.enu.ResultCodeEnum;
import lombok.Data;

/**
 * 业务异常基础类
 */
@Data
public class BizException  extends Exception{


    private String msg="success";
    private Integer code;
    private Object data;
    public BizException() {
    }
    public BizException(ResultCodeEnum resultCodeEnum, String msg, Object data) {

        this.msg = msg;
        this.data = data;
    }
    public BizException(String mes, ResultCodeEnum resultCodeEnum) {
        this.msg=mes;
        this.code =resultCodeEnum.getCode() ;
    }

}
